package edu.isistan.matching.filters;

import edu.isistan.matching.filters.io.ComposedParameter;
import edu.isistan.metamodel.Interface;
import edu.isistan.parser.Parser;
import edu.isistan.parser.JavaParser;

/**
 * Filtro que obtiene una representacion interna de un par de archivos
 * @author Marco
 *
 */
public class InstantiateMetamodelFilter implements IMatchingFilter<ComposedParameter<String, String>, ComposedParameter<Interface, Interface>> {

	Parser p0 = new JavaParser();
	Parser p1 = new JavaParser();
	
	public ComposedParameter<Interface, Interface> process(ComposedParameter<String, String> parameter) {				
		Interface inf0 = p0.getMetamodel(parameter.getParameter1());
		Interface inf1 = p1.getMetamodel(parameter.getParameter2());
		return new ComposedParameter<Interface, Interface>(inf0, inf1);
	}

}
